#ifndef CLASSEDITOR_H
#define CLASSEDITOR_H

#include <QGraphicsScene>
#include <QDialog>

class UmlClassItem;
class UmlClassDiagramm;

namespace Ui {
    class ClassEditor;
}

class ClassEditor : public QDialog {
    Q_OBJECT
public:
    ClassEditor(QWidget *parent = 0);
    ~ClassEditor();

    void setClassItem(UmlClassItem *classItem);

protected:
    void changeEvent(QEvent *e);

private:
    Ui::ClassEditor *ui;
    UmlClassItem *_classItem;

    UmlClassDiagramm *_scene;
    UmlClassItem *_previewItem;

private slots:
    void save();
    void cancel();
    void toggleIsAbstract();
    void toggleIsInterface();

public slots:
    void updatePreview();

};

#endif // CLASSEDITOR_H
